﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class test : System.Web.UI.Page
{
    //protected void Page_Load(object sender, EventArgs e)
    //{
    //    if (!this.IsPostBack)
    //    {
    //        tintuc.DataSource = LoaiDataHelper.LoadNgonNgu();
    //        tintuc.DataTextField = "Value";
    //        tintuc.DataValueField = "Key";
    //        tintuc.DataBind();
    //    }
    //}

    //protected void tintuc_OnSelectedIndexChanged(object sender, EventArgs e)
    //{
    //    rep.DataSource = LoaiDataHelper.LoadLoaiTinTuc(Convert.ToInt32( tintuc.SelectedValue));
    //    rep.DataBind();
    //}

    protected void btn(object sender, EventArgs e)
    {
        TrangTinhHelper tthelper = new TrangTinhHelper();
        TrangTinhDataSet ttds = new TrangTinhDataSet();
        for (int i = 0; i < 3; i++)
        {
            TrangTinhDataSet.TrangTinhRow row = ttds.TrangTinh.NewTrangTinhRow();
            row.ViTri = "LinkToChuc"+(i+1);
            row.Lang = 1;
            ttds.TrangTinh.AddTrangTinhRow(row);
        }
        tthelper.SaveTrangTinh(ttds);
    }
}